package com.lottery.material.entity.transaction;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.lottery.material.entity.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Description：提现记录表
 * Created by 朱正磊 on 2019-04-09 10:35
 */
@Entity
@Data
@EqualsAndHashCode(callSuper = false)
@Table(name = "material_draw_money_record")
public class DrawMoneyRecord extends BaseEntity {

    private static final long serialVersionUID = 6908902038968942161L;

    @Column(columnDefinition = "varchar(50) not null comment '提现用户id'")
    private String userId;

    @Column(columnDefinition = "varchar(20) comment '用户手机号'")
    private String phoneNumber;

    @Column(columnDefinition = "varchar(20) comment '真实姓名'")
    private String realName;

    @Column(columnDefinition = "varchar(50) comment '身份证号'")
    private String idNumber;

    @Column(columnDefinition = "varchar(20) comment '银行卡卡号'")
    private String bankCardNumber;

    @Column(columnDefinition = "varchar(10) comment '开户银行编号（对应material_bank_dict表中bank_code）'")
    private String bankCode;

    @Column(columnDefinition = "varchar(10) comment '开户银行（对应material_bank_dict表中bank_name）'")
    private String bankName;

    @Column(columnDefinition = "decimal(19,2) comment '提现金额'")
    private BigDecimal amount;

    @Column(columnDefinition = "int(1) default '1' comment '状态（1：待提现；2：已提现）'")
    private Integer state;

    @Column(columnDefinition = "varchar(50) comment '操作用户id（对应后台用户id）'")
    private String operationUserId;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(columnDefinition = "datetime comment '操作时间'")
    private Date operationTime;

    @Column(columnDefinition = "varchar(255) comment '备注（如：修改提现银行卡信息等操作需要备注）'")
    private String remark;

}
